package org.momo.rpc.service;

import org.momo.rpc.annotion.RateLimit;
import org.momo.rpc.annotion.Retry;
import org.momo.rpc.api.OrderService;
import org.momo.rpc.api.model.Order;
import org.momo.rpc.constant.RateLimitKey;
import org.momo.rpc.springboot.starter.annotion.RpcService;
import org.springframework.stereotype.Service;

@Service
@RpcService(serviceName = "order", serviceVersion = "v1.0")
public class OrderServiceImpl implements OrderService {
    @Override
    @RateLimit(type = RateLimitKey.TOKEN)
    @Retry
    public Order queryOrderById(Long id) {
        return new Order();
    }
}
